package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 举报投诉
 */
@Entity
@Table(name = "t_control_report")
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Report extends BaseEntity {

    @Column(name = "headline", length = 80)
    private String headline;                //标题

    @Column(name = "content", length = 240)
    private String content;                 //内容

    @Column(name = "reportTime", length = 50)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Temporal(TemporalType.TIMESTAMP)
    private Date reportTime;              //举报时间

    @Column(name = "reply", length = 240)
    private String reply;                  //回复

    @Column(name = "replyTime", length = 50)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Temporal(TemporalType.TIMESTAMP)
    private Date replyTime;               //回复时间

    @Column(name = "productName", length = 20)
    private String productName;              //产品名称

    @Column(name = "enterprise", length = 50)
    private String enterprise;              //企业

    @Column(name = "traceCode", length = 50)
    private String traceCode;               //追溯码

    @Column(name = "state", length = 20)
    private String state;         //受理状态
}
